package com.example.sportgoods.Service.impl;

import com.example.sportgoods.domain.Order;
import com.example.sportgoods.domain.Shop;
import com.example.sportgoods.domain.User;
import com.example.sportgoods.mapper.UserMapper;
import com.example.sportgoods.Service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    public List<User> getUsers(){
        return userMapper.getAll();
    }

    public int insertUser(User user){
        return userMapper.insertUser(user);
    }

    public int deleteUserById(Long id){
        return userMapper.deleteUserById(id);
    }
    @Override
    public User selectUserById(Long id)
    {
        return userMapper.selectUserById(id);
    }
    @Override
    public int updateUser(User user) {
        return userMapper.updateUser(user);
    }

}